Repository navigation
Conversation
|
@tcr3dr Was the More generally, the later case interests me. Yes we get all parameters on load, but how do we compensate for the possibility they might change - either due to a connected GCS or automatically in autotune? |
|
@hamishwillee The old behavior of this was to wait for all parameters to be downloaded before So our choice is to:
I'm strongly against the latter, since it makes property access magical and even network-dependent. It's better to explicitly say where the parameter download behavior should occur. Right now that is possible with the Basically, I would want my script to a) connect to the drone, b) download the current state of all variables, and c) receive updates over time so that our state always mirrors that of the autopilot. I think that's the case right now with In summary, I would never call |
|
@tcr3dr Thanks Tim - All examples already use Essentially there are two models a developer might like. The one you describe after "Basically, I would ..." is one model, and the one everyone uses and understands at the moment. The other is where you allow connection without parameters, but people can get individual parameters when they need them. I think you're saying if that they try to get a parameter that has not yet downloaded this will fail. Anyway, upshot at the moment is that I probably should document this expectation in http://python.dronekit.io/guide/vehicle_state_and_parameters.html#parameters - OK? |
|
Gonna hold off on this pending more discussion. |
|
Either way, we need to have a short discussion in the near future so you can confirm exactly what behaviour parameters has, so I can update the docs. Are we getting/do we need parameter observers? My gut feeling is that they are a "nice to have" not a "need" - you'd only really need an observer for maintaining a UI (ie for re-writing a GCS) and in most cases the UI for parameters would tend to be a static set of data that would be opened only for changes (so wouldn't need monitoring)/ |
|
Given that we have .set() and .get() now, it seems users have all the control they need to avoid auto-parameter download behavior. Going to close this. |
|
Good idea |
This behavior seems fairly "magical", requires a hack in Solo, and also .wait_valid() in terms of parameters should be generalized in the
.wait('parameters')magic (#342).